define(["jquery"],function($){
	return function itemsMsg(itemNum){
		$.ajax({
			
			url:"https://open.lenovo.com.cn/goods/detail/mget?isDetail=false",
			data:{code:"1005308,1005068,1004787,1005176,1005529,1005530,1005695,1004643,1004533,1003599,1003597,1002905,1005075,1005077,1004444,1004037,1000179,1004927,1003170,1002305,1002496,1002955,1002494,1004582&_=1567414913489"},
			dataType:"jsonp",
			jsonp:"jsonpCallback",
			success:function(data){
				console.log(data.result[itemNum].detail)
				let item_msg = document.getElementsByClassName("item-right")[0];
				let item_left = document.getElementsByClassName("item-left")[0];
				//console.log(item_msg);
				
				//左边的图片地址
				item_left.innerHTML = `<img src="${data.result[itemNum].detail.thumbnail}"/>`;
				//右边的信息
				item_msg.innerHTML = `
					<h1>${data.result[itemNum].detail.name}</h1>
					<div class="dec">${data.result[itemNum].detail.brief}</div>
					<div class="item-price">
						<div class="item-price-wrap">
							<div class="pri-content">
								<p>商城价</p>
								<div class="price-group">
									<span>￥</span><span id="item-price">${data.result[itemNum].detail.basePrice}</span>
								</div>
							</div>
							<div class="comment-total">
								<p>累计评价</p>
								<p>0</p>
							</div>
						</div>
					</div>
					<div class="item-models">
						<div class="choice-model">选择配置</div>
						<div class="models-detail">
							<span>空气净化器</span>
							<span>净化器复合滤芯</span>
						</div>
					</div>
					<div class="date-pay">
						<p>分期付款</p>
						<div class="huabei">
							<div class="icon">
								<img src="https://p3.lefile.cn/product/adminweb/2019/05/06/e655fdc5-86aa-4b71-81bd-a03e5bab0be4.png"/>
								<span id="hua-tit">花呗分期</span>
								<div class="chioce-pay">
									
								</div>
							</div>
						</div>
						<div class="bank">
							
						</div>
					</div>
					<div class="items-count">
						<p>购买数量</p>
						<div class="input-count">
							<div class="add-count">
								<span class="sub-Btn"></span>
								<input type="text" id="item-count" value="1"/>
								<span class="add-Btn"></span>
							</div>
							<div class="desc"></div>
						</div>
					</div>
					
				`;
				
			}
		})
	}
})
		